package com.itheima.controller;

import com.itheima.health.entity.QueryPageBean;
import com.itheima.health.entity.Result;

import com.itheima.health.service.CheckItemService;

import org.apache.dubbo.common.utils.Page;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

@RestController
//@Api(tags = "检查项管理开发")  // 作用在类上 用于就接口文档的生成
public class CheckItemController {

    @Reference
    private CheckItemService checkItemService;

    @GetMapping("checkitem/findAll")
    public Result findAll() {

        return new Result(checkItemService.list());
    }


    @PostMapping("checkitem/findPage")//分页查询 用post请求
    public Result findPage(@RequestBody QueryPageBean queryPageBean) {
        System.out.println(queryPageBean.getCurrentPage());
        return new Result(checkItemService.findPage(queryPageBean));

    }


}








